-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better config #25
Better config #25
Conversation
->scalarNode('engine')->defaultValue('azure-search')->end() | ||
->scalarNode('api_key')->isRequired()->end() | ||
->scalarNode('endpoint')->isRequired()->end() | ||
->scalarNode('index_name')->isRequired()->end() | ||
->scalarNode('api_version')->defaultValue('2024-07-01')->end() | ||
->scalarNode('vector_field_name')->defaultValue('vector')->end() | ||
->end() | ||
->end() | ||
// ->arrayNode('mongodb') | ||
// ->children() | ||
// ->scalarNode('engine')->defaultValue('mongodb')->end() | ||
// ->scalarNode('uri')->isRequired()->end() | ||
// ->scalarNode('database_name')->isRequired()->end() | ||
// ->scalarNode('collection_name')->isRequired()->end() | ||
// ->scalarNode('index_name')->end() | ||
// ->scalarNode('vector_field_name')->defaultValue('vector')->end() | ||
// ->booleanNode('bulk_write')->defaultFalse()->end() | ||
// ->end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much more maintainable to me
->children() | ||
->arrayNode('chroma_db') | ||
->children() | ||
->scalarNode('engine')->defaultValue('chroma-db')->end() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could drop the engine key now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or the best with config component 😄 feel free to test my PR or finish it 😊
This will not work, after this change I am not able to have: stores:
chroma_db_products:
engine: 'chroma-db'
collection_name: '%env(CHROMA_COLLECTION_PRODUCTS)%'
chroma_db_foo:
engine: 'chroma-db'
collection_name: '%env(CHROMA_COLLECTION_FOO)%' |
true ... |
Can be merged after